package com.sheledon.demo.demo2.intercept.aop;

import com.sheledon.flyCat.annotation.aop.After;
import com.sheledon.flyCat.annotation.aop.Aspect;
import com.sheledon.flyCat.annotation.aop.Before;
import com.sheledon.flyCat.annotation.aop.PointCut;
import com.sheledon.flyCat.core.aop.lang.JoinPoint;

@Aspect
public class TeacherAop {

    @PointCut(value = "com.sheledon.demo.demo2.*.TeacherController")
    public void point(){}


    @Before
    public void beforeAction1(JoinPoint params){
        System.out.println("老师来了，老师来了");
    }
    @Before
    public void beforeAction2(JoinPoint params){
        System.out.println("起立");
    }
    @After
    public void afterAction1(JoinPoint params){
        System.out.println("下课");
    }
    @After
    public void afterAction2(JoinPoint params){
        System.out.println("老师走了");
    }
}
